  {% include file="index.header.tpl.php" %}
  {% include file="index.left.tpl.php" %}
   <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="" method="get" name="myform">	
                <div class="box-header with-border">
                    <span class="fa fa-pencil" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">班主任经验交流</p>
                    <a href="index.php?a=exchange.add" class="btn btn-primary btn-sm" style="float:right;">新 增</a>
                </div>
				<div class="box-body">
                                             <div class="col-md-3 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-3 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
							   年级：
						  </label>
						  <div class="input-group col-md-9 col-xs-12">
							   <select class="form-control" name="grade_id" >
									<option></option>
							   {%foreach from=$grade_lists key=key item=value%}
									<option value="{%$value.grade_id%}" {%if $value.grade_id==$grade_id%}selected{%/if%}>{%$value.grade_name%}</option>
							   {%/foreach%}
                                </select>
						  </div> 
				    </div>
					<div class="col-md-3 form-group">
						  <label for="inputPassword3" class="col-sm-3 control-label" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   班级
						  </label>
						  <div class="input-group col-md-9 col-xs-12">
							   <select class="form-control" name="class_id">
									<option></option>
							   {%foreach from=$class_lists key=key item=value%}
									<option value="{%$value.class_id%}" {%if $value.class_id==$class_id%}selected{%/if%}>{%$value.class_name%}</option>
							   {%/foreach%}
                                </select>
						  </div> 
				    </div>                   
					<div class="col-md-5 col-xs-12 form-group">
						  <label for="inputPassword3" class="col-sm-1 control-label" style="padding-right:0; padding-left:0; font-weight:500; ">
							   日期：
						  </label>
						  <div class="input-group col-sm-5" style="float:left;">
							   <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
							     <div class="input-group-addon" style="padding:6px 7px;">
									<i class="fa fa-calendar"></i>
								 </div>
						  </div>
						  <span style="float:left;">  ~  </span >
						  <div class="input-group col-sm-5" style="float:left;">
							   <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
							      <div class="input-group-addon" style="padding:6px 7px;">
									 <i class="fa fa-calendar"></i>
								 </div>
						  </div>						  
				    </div>
					<div class="col-md-1 col-xs-12">
					   <input type="hidden" name="a"  value="exchange.list">
					   <button type="submit" class="btn btn-warning">查 询</button>
					</div>
					<div style="clear:both; height:10px;"></div>

                     <table class="table table-bordered"  id="mytable">
                                <thead>
                                    <tr>
									    <td>年级</td>
                                        <td>班级</td>
                                        <td>标题</td>
                                        <td>提交者</td>
										<td>提交日期</td>
										<td width="130">操作</td>
                                    </tr>	
                                </thead>
                                <tbody>
								 {%foreach from=$manage_lists key=key item=value%}
                                    <tr>
									    <td>{%$value.grade_name%}</td>
                                        <td>{%$value.class_name%}</td>
                                        <td><a href="page.html" style="color:#444">{%$value.manage_title|truncate:20:"..." %}</a></td>
                                        <td>{%$value.staff_name%}</td>
										<td>{%$value.create_time%}</td>
                                        <td>
                                        	  <a href="index.php?a=exchange.update&manage_id={%$value.manage_id%}" class="btn btn-warning btn-xs"> 修  改 </a>
											  <a href="index.php?a=exchange.del&manage_id={%$value.manage_id%}" onclick="if(confirm('警告！确认删除信息?')==false)return false;"class="btn btn-danger btn-xs"> 删  除 </a>
                                        </td>
                                    </tr>	
                                {%/foreach%}   
                            </tbody>
                        </table>
				   </div><!--box-body -->
               </form>
			   {%$page%}
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
  {% include file="index.footer.tpl.php" %}
  <script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>
  <script>
  $(function() {
    $( "#starttime" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#endtime" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#endtime" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#starttime" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>
